//
//(C) Copyright 2011 HongKong Airline.,Ltd. 
//
/**
 * buyguideServiceImpl
 * 项目名称:代购系统
 *
 * @author Mengxiangliang
 *
 * 功能描述:
 * 
 * 历史版本:2013-01-04 v1.0.0 Mengxiangliang  创建:
 * 
 */
 
package com.gamutsoft.amb.buyguide.service.impl;

import java.util.List;
import java.util.Map;

import com.gamutsoft.amb.buyguide.dao.IBuyguideDao;
import com.gamutsoft.amb.buyguide.model.Buyguide;
import com.gamutsoft.amb.buyguide.service.IBuyguideService;
import com.gamutsoft.amb.common.bean.QueryExample;
import com.gamutsoft.amb.common.exception.BusinessException;
import com.gamutsoft.amb.common.service.impl.GenericServiceImpl;

public class BuyguideServiceImpl extends GenericServiceImpl<Buyguide, Long> implements IBuyguideService {
	public IBuyguideDao buyguideDao;

    public BuyguideServiceImpl(IBuyguideDao buyguideDao) {
		super(buyguideDao);
		this.buyguideDao = buyguideDao;
	}
	
	/**
	 * 根据条件查询记录
	 * @author Mengxiangliang
	 * @param  QueryExample
	 * @return BuyguideList
	 * @throws BusinessException
	 */
	public List<Map> searchBuyguideList(QueryExample qe) throws BusinessException{
	  
	   return buyguideDao.searchBuyguideList(qe);
	   
	}
	
	/**
	 * 根据ID查询记录
	 * @author Mengxiangliang
	 * @param Long id
	 * @return domain
	 * @throws BusinessException
	 */
	public Buyguide searchBuyguideById(Long id) throws BusinessException{
	  
	   return buyguideDao.searchBuyguideById(id);
	   
	}

	/**
	 *  删除记录
	 * @author Mengxiangliang	 
	 * @param id
	 * @throws BusinessException
	 */
	public void deleteBuyguideById(Long id) throws BusinessException{
	 
	  buyguideDao.deleteBuyguideById(id);
	  
	}
	
	/**
	 * 修改记录
	 * @author Mengxiangliang
	 * @param domain
	 * @throws BusinessException
	 */
	public void updateBuyguide(Buyguide domain) throws BusinessException{
	
	   buyguideDao.save(domain);
	   
	}

	/**
	 * 新增记录
	 * @author Mengxiangliang
	 * @param domain
	 * @return
	 * @throws BusinessException
	 */
	public void createBuyguide(Buyguide domain) throws BusinessException{
	
	   buyguideDao.save(domain);
	}

	@Override
	public List<Map> searchBuyguideListByWhere(QueryExample qe, Buyguide domain)
			throws BusinessException {
		// TODO Auto-generated method stub
		return buyguideDao.searchBuyguideListByWhere(qe, domain);
	}
	

}